package main

import (
	"goProject/api"
	"goProject/cfg"
	_ "goProject/db"
	_ "goProject/table"
	"os"
	"os/signal"
	"syscall"

	"gitee.com/ruige_fun/util/rlog"
)

var (
	BuildTime = "未加入编译信息"
)

func main() {
	rlog.Init()
	rlog.Success("当前程序的编译时间为：", BuildTime)
	cfg.BuildTime = BuildTime
	var ch = make(chan os.Signal) //信号通道
	go api.Run(cfg.Config.Main.Port)
	signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM)
	<-ch
	rlog.WaitFinish()
}
